'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.OLE.IPicture)> _
    Public Interface IPicture
        <PreserveSig()> Function get_Handle(<Out()> ByRef pHandle As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_hPal(<Out()> ByRef phPal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_Type(<Out()> ByRef pType As PicType) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_Width(<Out()> ByRef pWidth As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_Height(<Out()> ByRef pHeight As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Render(ByVal hDC As IntPtr, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal xSrc As Integer, ByVal ySrc As Integer, ByVal cxSrc As Integer, ByVal cySrc As Integer, ByVal rcBounds As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function sett_hPal(ByVal phPal As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_CurDC(<Out()> ByRef phDC As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SelectPicture(ByVal hdcIn As IntPtr, <Out()> ByRef phdcOut As IntPtr, <Out()> ByRef phbmpOut As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_KeepOriginalFormat(<Out(), MarshalAs(UnmanagedType.Bool)> ByRef pKeep As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function put_KeepOriginalFormat(<MarshalAs(UnmanagedType.Bool)> ByVal keep As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function PictureChanged() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SaveAsFile(ByRef pstm As IStream, <MarshalAs(UnmanagedType.Bool)> ByVal fSaveMemCopy As Boolean, <Out()> ByRef pcbSize As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function get_Attributes(<Out()> ByRef pDwAttr As PictureAttributes) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace
